<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
		<link rel="stylesheet" href="{$Think.config.Style}/css/ch-ui.admin.css">
	<link rel="stylesheet" href="{$Think.config.Style}/font/css/font-awesome.min.css">
	<script type="text/javascript" src="{$Think.config.Style}/js/jquery.min.js"></script>
	<script type="text/javascript" src="{$Think.config.Style}/layer/layer.js"></script>

</head>
<body style="background:#F3F3F4;">
	<div class="login_box">
		<h1>System</h1>
		<h2>欢迎使用积分管理系统</h2>
		<div class="form">
			<form>
				<ul>
					<li>
					<input type="text" name="username" class="text"/>
						<span><i class="fa fa-user"></i></span>
					</li>
					<li>
						<input type="password" name="password" class="text"/>
						<span><i class="fa fa-lock"></i></span>
					</li>
					<li>
						<input type="text" class="code" name="code"/>
						<span><i class="fa fa-check-square-o"></i></span>
						<img src="{:captcha_src()}" alt="captcha" onclick="this.src='{:captcha_src()}?'+Math.random()" width="200px" height="100px" />
					</li>
					<li>
						<input type="button" onclick="sub(this)" value="立即登陆"/>
					</li>
				</ul>
			</form>
		</div>
	</div>
	<script type="text/javascript">
function sub(){
          $.ajax({
            type : 'post',
            url :'{:url('back/login/logining')}',
            data : $("form").serialize(),
            dataType : 'json',
            success : function(data){
               if(data.status==1){             	
               window.location.href='{:url('back/Index/index')}';
              }else{
                layer.msg(data.msg, {icon: 2,time: 2000});
               }
            }
        });
    }
	</script>
</body>
</html>